|
If you can't view the Datasheet, Please click here to try to view without PDF Reader . |
|
Datasheet File OCR Text: |
november 2014 docid023035 rev 4 1/35 1 AN4080 application note getting started with stm32f0x1/x2/x8 hardware development introduction this application note is intended for system designers who require a hardware implementation overview of the development board features such as the power supply, the clock management, the reset control, the boot mode settings and the debug management. it shows how to use the stm32f0xxxx product family and describes the minimum hardware resources required to develop your application. within the stm32f0xxxx product family, the stm32f0x8 line offers a different embedded power management to support 1.8 v operation. this document also includes detailed reference design schematics with the description of the main components, interfaces and modes. note: in this document, the notation used for devices is stm32f0xx where xx are the two first digits following f0 standing for entry-level family. pin count and memory size d not impact this hardware description. table 1. applicable products type part number microcontrollers stm32f031c4, stm32f031c6, stm32f031f4, stm32f031f6, stm32f031g4, stm32f031g6, stm32f031k4, stm32f031k6, stm32f038c6, stm32f038f6, stm32f038g6, stm32f038k6, stm32f042c4, stm32f042c6, stm32f042f4, stm32f042f6, stm32f042g4, stm32f042g6, stm32f042k4, stm32f042k6, stm32f042t4, stm32f042t6, stm32f048c6, stm32f048g6, stm32f048t6 stm32f051c4, stm32f051c6, stm32f051c8, stm32f051k4, stm32f051k6, stm32f051k8, stm32f051r4, stm32f051r6, stm32f051r8, stm32f058c8, stm32f058r8, stm32f071v8, stm32f071cb, stm32f071rb, stm32f071vb, stm32f072c8, stm32f072r8, stm32f072v8, stm32f072cb,stm32f072rb, stm32f072vb, stm32f078cb, stm32f078rb, stm32f078vb, stm32f091cb, stm32f091rb, stm32f091vb, stm32f091cc, stm32f091rc, stm32f091vc, stm32f098cc, stm32f098rc, stm32f098vc www.st.com
contents AN4080 2/35 docid023035 rev 4 contents 1 power supplies and reset sources of the stm32f0xx family . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 1.1 power supply schemes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 1.1.1 independent analog converter supply . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 1.1.2 battery backup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 1.1.3 voltage regulator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 1.2 reset and power supply supervisor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 1.2.1 power-on reset (por) / power-down reset (pdr) of the stm32f0x1/x2 devices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 1.2.2 external power-on reset and power-down reset (npor) of the stm32f0x8 devices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 1.2.3 system reset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 1.2.4 programmable voltage detector (pvd) of the stm32f0x1/x2 devices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 2 clocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 2.1 high speed external clock signal (hse) osc clock . . . . . . . . . . . . . . . . . 16 2.2 lse clock . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 2.3 hsi 8 mhz clock . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 2.4 lsi clock . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 2.5 adc clock . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 2.6 hsi 48 mhz clock . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 2.6.1 hsi 48 mhz rc oscillator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 2.6.2 hsi 48 mhz clock recovery system (crs) . . . . . . . . . . . . . . . . . . . . . . 19 2.7 clock security system (css) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 3 boot configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 4 debug management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 4.1 introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 4.2 swd port (serial wire debug) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 4.3 pinout and debug port pins . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 4.3.1 serial wire debug (swd) pin assignment . . . . . . . . . . . . . . . . . . . . . . . 22 4.3.2 swd pin assignment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 docid023035 rev 4 3/35 AN4080 contents 3 4.3.3 internal pull-up and pull-down on swd pins . . . . . . . . . . . . . . . . . . . . . 23 4.3.4 swd port connection with standard swd connector . . . . . . . . . . . . . . 23 5 recommendations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 5.1 printed circuit board . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 5.2 component position . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 5.3 ground and power supply (v dd , v dda , v ddio2 ) . . . . . . . . . . . . . . . . . . . . 24 5.4 decoupling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 5.5 other signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 5.6 unused i/os and features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 6 reference design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 6.1 description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 6.1.1 clock . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 6.1.2 reset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 6.1.3 stm32f0x8 power-on reset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 6.1.4 boot mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 6.1.5 swd interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 6.1.6 power supply . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 6.1.7 pinouts and pin description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 6.2 component references . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 7 hardware migration from stm32f1 to stm32f0 series . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 8 revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 list of tables AN4080 4/35 docid023035 rev 4 list of tables table 1. applicable products. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 table 2. power supplies of the stm32f0xx family. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 table 3. boot modes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 table 4. swd port pins. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 table 5. mandatory components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 table 6. optional components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 table 7. stm32f1 series and stm32f03x/5x device pinout differences . . . . . . . . . . . . . . . . . . . . 32 table 8. stm32f1 series and stm32f04x device pinout differences . . . . . . . . . . . . . . . . . . . . . . . 32 table 9. stm32f1 series and stm32f07x device pinout differences . . . . . . . . . . . . . . . . . . . . . . . 32 table 10. stm32f1 series and stm32f09x device pinout differences . . . . . . . . . . . . . . . . . . . . . . . 33 table 11. document revision history. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 docid023035 rev 4 5/35 AN4080 list of figures 5 list of figures figure 1. power supply scheme of stm32f0x1/x2 devices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 figure 2. power supply scheme of stm32f0x8 devices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 figure 3. schottky diode connection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 figure 4. power on reset/power down reset waveform . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 figure 5. simplified diagram of the reset circuit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .12 figure 6. pvd thresholds . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 figure 7. hse/ lse clock sources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 figure 8. host-to-board connection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 figure 9. swd port connection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 figure 10. typical layout for v dd /v ss pair . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 figure 11. stm32f051r8 microcontroller reference schematic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 figure 12. stm32f058r8 microcontroller reference schematic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 figure 13. stm32f072 microcontroller reference schematics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 power supplies and reset sources of the stm32f0xx family AN4080 6/35 docid023035 rev 4 1 power supplies and reset sources of the stm32f0xx family 1.1 power supply schemes the stm32f0xx family features different products with various supply schemes. it includes an internal regulator in order to have an internal 1.8 v supply for the core and digital logic. on stm32f0x8 line, the voltage regulator is bypassed, therefore the 1.8 v power supply must be provided to the chip by an external regulator. there is a variety of power supply schemes: ? v dd : external power supply for i/os and the 1.8 v domain. provided externally through v dd pins. ? v dda : external analog power supply for adc/dac, reset blocks, hsi, hsi14, hsi48, lsi and pll (minimum voltage to be applied to v dda is 2.4 v when the adc or dac are used). the v dda voltage level must always be greater than or equal to the v dd voltage level and must be provided first. ? v ddio2 : external power supply for some dedicated ios that is provided externally through the vddio2 pin. the v ddio2 voltage level is fully independent from v dd or v dda , but it must not be provided without a valid supply on v dd . refer to the dedicated device datasheet to find the concerned list of i/os. ? v bat : power supply for rtc, lse 32 khz oscillator and backup registers (through power switch) when v dd is not present. table 2. power supplies of the stm32f0xx family product family power supply stm32f0x1 stm32f0x2 stm32f0x8 v dd 2.0 to 3.6 v 1.8 v +/- 8 % v dda v dd to 3.6 v v ddio2 (1) 1. v ddio2 power supply is not available on all parts, refer to the dedicated device datasheet to check if it is available. 1.65 to 3.6 v v bat 1.65 to 3.6 v docid023035 rev 4 7/35 AN4080 power supplies and reset sources of the stm32f0xx family 34 figure 1. power supply scheme of stm32f0x1/x2 devices 1. refer to the specific device datasheet to know which pins are supplied by v dd or by v ddio2 . 0 6 y 9 / h y h o v k l i w h u , 2 o r j l f . h u q h o o r j l f & |